<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
  <head>
    <base href="http://127.0.0.1/ebpm/">
    
    <title>My JSP 'MyJsp.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="wf/wf.css">
	
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="wf/UserTask.js"></script>
	<script type="text/javascript" src="wf/UserTaskList.js"></script>
	<script type="text/javascript" src="wf/Line.js"></script>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
	<script type="text/javascript">
		function uploadFile() {
			var formData = new FormData();
			formData.append("file", $("#defineFile")[0].files[0]);
			formData.append("name", 'defineFile');
			$.ajax({
			    url: 'wf/deploy',
			    type: 'POST',
			    data: formData,
			    // 告诉jQuery不要去处理发送的数据
			    processData: false,
			    // 告诉jQuery不要去设置Content-Type请求头
			    contentType: false,
			    success: function(data) {
			    	var wf = new WorkFlow(data, 10);
			    	wf.show();
			    },
			    error: function(responseStr) {
			        console.log(responseStr.responseText);
			    }
			});
		}
	</script>

  </head>
  
  <body>
  	<div style="position: fixed;bottom: 0;background: #c4c4c4 ;width:100%;height: 80px;text-align: center;padding-top:20px;">
		<input id="defineFile" type="file" multiple="multiple" name="file"  style="width:300px;font-size: 20px;" />
   		<input type="button" onclick="uploadFile()" style="width:120px;height:40px;cursor: pointer;font-size:20px;" value="上传提交"  >
   		<input type="button" onclick="window.location.href='wf/index'" style="width:120px;height:40px;cursor: pointer;font-size:20px;" value="返回首页"  >
	</div>   		
  </body>
</html>
